package net.java.dev.jugbrescia.test.xml.model;

import java.util.ArrayList;
import java.util.List;

import com.thoughtworks.xstream.annotations.XStreamAlias;

@XStreamAlias("lib:library")
public class Library
{
	@XStreamAlias("lib:books")
	private List<Book> books;
	public Library()
	{
		this.books = new ArrayList<Book>();
	}
	public List<Book> getBooks()
	{
		return books;
	}
	public void addBook(final Book book)
	{
		this.books.add(book);
	}
	public String toString()
	{
		return this.books != null ? this.books.toString() : "NULL";
	}
}